import requests
def face_analyze(API_key,API_secret,face_tokens,landmark=1,attributes=None,beauty_score_min=0,beauty_score_max=100):
    """face++ 人脸分析接口函数(face_tokens)"""
    face_analyze_url = 'https://api-cn.faceplusplus.com/facepp/v3/face/analyze'
    payload = {
        'api_key':API_key,
        'api_secret':API_secret,
        'face_tokens':face_tokens,
        'return_landmark':landmark,
        'return_attributes':attributes,
        'beauty_score_min':beauty_score_min,
        'beauty_score_max':beauty_score_max
    }
    r = requests.post(face_analyze_url,payload)
    return r.json()
